﻿namespace MvcFlow.Hosts
{
    public class HttpApplicationWorkflowHost : IWorkflowHost
    {
        private readonly bool? isDebugging;

        public bool IsDebugging(System.Web.Routing.RequestContext requestContext)
        {
            return isDebugging != null ? isDebugging.Value : requestContext.HttpContext.IsDebuggingEnabled;
        }

        public HttpApplicationWorkflowHost( bool? isDebugging = null )
        {
            this.isDebugging = isDebugging;
        }
    }
}